This is a translation of the Word API for Borland Pascal 7. It works with Borland's Delphi as well. The original "C" sources are shipped with Microsoft's Word Development Kit. -------------------------------------------------------------------------- LEGAL STUFF: "These materials were developed from a Product of Microsoft Corporation, which reserves all rights. They have been modified by Martin Austermeier" Disclaimer: Use this software at your own risk. The author (Martin Austermeier) gives no warranties of any kind. Especially, the author refuses any responsibility for functionality or data loss. -------------------------------------------------------------------------- There are two ways to use the Units: * for building a .WLL (Word Add-In DLL) See TESTWLL.PAS for an example .WLL After compiling, rename the .DLL to *.WLL to use it with Word (-> File/Templates..) * for executing WordBasic commands from your application via SendMessage() This is safer than using DDE, because no asynchronous protocol has to be used. Define the switch "USE_SENDMESSAGE" (see CAPILIB.PAS) { in fact, SendMessage() may also be used from a .WLL, so this is the default setting } Include the units in your application, and call Word like shown in the sample functions in TESTEXE.Test1 (contained in TEST.INC) Note: I have renamed the string functions containing "$" in WDCMDS, as Pascal treats "$" differently. "$" became "Str", so "Selection$" is "wdSelectionStr". Have fun :) Martin Austermeier 100116.3455@compuserve.com